package com.blb.community_admin.entity;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ZyUnit {
  @TableId
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty("单元ID")
  private long unitId;
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty("单元ID")
  private long communityId;
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty("单元ID")
  private long buildingId;
  @ExcelProperty("单元ID")
  private String unitName;
  @ExcelProperty("单元ID")
  private String unitCode;
  @ExcelProperty("单元ID")
  private long unitLevel;
  @ExcelProperty("单元ID")
  private double unitAcreage;
  @ExcelProperty("单元ID")
  private String unitHaveElevator;
  @ExcelProperty("单元ID")
  private String createBy;
  @ExcelProperty("单元ID")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime createTime;
  @ExcelProperty("单元ID")
  private String updateBy;
  @ExcelProperty("单元ID")
  private LocalDateTime updateTime;
  @ExcelProperty("单元ID")
  private String remark;

  @ExcelIgnore
  @TableField(exist =false)
  private ZyBuilding zyBuilding;
  @TableField(exist =false)
  @ExcelIgnore
  private ZyCommunity zyCommunity;




}
